package com.idudiao.sc.common.core.validator;

import com.idudiao.sc.common.core.validator.constraints.Dictionary;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * 数据字典值校验逻辑
 *
 * @author songyinyin
 * @since 2019/2/28 14:24
 */
public class DictionaryValidator implements ConstraintValidator<Dictionary, String> {

    /**
     * 字典类型
     */
    private String type;

    @Override
    public void initialize(Dictionary constraintAnnotation) {
        type = constraintAnnotation.value();
    }

    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        // TODO
        return false;
    }
}
